Declare @Id Int                               
Select @Id = Id From sysobjects Where Name = 'Sahmiyeh'
if not Exists(SELECT * FROM syscolumns WHERE id = @Id and Name = 'KindHfani')
  Alter Table Sahmiyeh Add KindHfani char(1) DEFAULT(0) 


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Sp_GoodsSupportiveCompanies]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[Sp_GoodsSupportiveCompanies]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SupplementaryInsurance_CalcFormula]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SupplementaryInsurance_CalcFormula]